package class_7;

import java.util.Arrays;
import java.util.Scanner;

public class Main1 {
	public static long gcb(long a,long b) {
		return b==0?a:gcb(b,a%b);
	}
	public static long lcm(long a,long b) {
		return (a/gcb(a,b) * b);
	}
	public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    long a,b;
    while(in.hasNext()) {
    	a = in.nextLong();
    	b = in.nextLong();
    	System.out.println(lcm(a,b));
    }
	}
}

class Solution {
	public static int[] nums = new int[100001];
	public static int n;
    /**
     * 代码中的类名、方法名、参数名已经指定，请勿修改，直接返回方法规定的值即可
     *
     * max increasing subsequence
     * @param arr int整型一维数组 the array
     * @return int整型
     */
    public static int MLS (int[] arr) {
        // write code here
    	Arrays.fill(nums, 0);
    	Arrays.sort(arr);
    	n = arr.length;
    	for(int x: arr) {
    		nums[x] = 1;
    	}
    	int max = Integer.MIN_VALUE;
    	int count = 0;
    	for(int i=0;i<nums.length;i++) {
    		if(nums[i]==0) {
    			count++;
    		}
    		else {
    			max = Math.max(max, count);
    			count = 0;
    		}
    	}
    	return max;
    }
}


class Solution1 {
    public static int MAX = 1000000;
    public static int[] nums = new int[1000000];
    public static int n;
    /**
     * 代码中的类名、方法名、参数名已经指定，请勿修改，直接返回方法规定的值即可
     *
     * max increasing subsequence
     * @param arr int整型一维数组 the array
     * @return int整型
     */
    public static int MLS (int[] arr) {
        // write code here
        Arrays.fill(nums, 0);
        Arrays.sort(arr);
        n = arr.length;
        for (int x : arr) {
            if(x<MAX)
                nums[x] = 1;
        }
        int max = Integer.MIN_VALUE;
        int count = 0;
        for (int i = 0; i < nums.length; i++) {
            if (nums[i] != 0) {
                count++;
            } else {
                max = Math.max(max, count);
                count = 0;
            }
        }
        return max;
    }
}

class Main {
	public static char[][] matrix = new char[501][501];
	public static int n,m;
	public static int count;
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            n = in.nextInt();
            m = in.nextInt();
            for(int i=0;i<n;i++) {
            	String s = in.next();
            	for(int j=0;j<m;j++) {
            		matrix[i][j] = s.charAt(j);
            	}
            }
            System.out.println();
            count = 0;
            f(0,0);
            System.out.println(count);
        }
    }
    public static void f(int i,int j) {
    	if(i>=n||j>=m) {
    		return ;
    	}
    	char ch = matrix[i][j];
    	if(ch =='l') {
    		count += 4;
    	}
    	else if(ch =='o') {
    		count += 3;
    	}
    	else if(ch =='v') {
    		count += 2;
    	}
    	else if(ch =='e') {
    		count ++;
    	}
    	f(i+1,j);
    	f(i,j+1);
    }
}